#include "Choice.h"

/**
* Constructeur
*/
Choice::Choice( CARDINALITY card ) : Children( card )
{
	// TODO
}
Choice::Choice( CARDINALITY card, list<ContentParticules*>& CPList) : Children( card, CPList)
{
	
}

/**
* Destructeur
*/
Choice::~Choice()
{
	// TODO
}

void Choice::printMe()
{
	std::cout<<"(";
	std::list<ContentParticules*>::iterator p = particules.begin();
	while(p != particules.end())
	{
		(*p)->printMe();
		p++;
		if(p != particules.end())
			std::cout<<" | ";
	}
	std::cout<<")"<<getCardinalityString();
}

/**
* Transforme le choix en un reg exp
*/
std::string Choice::toRegExp()
{
	return Children::toRegExp( '|' );
}
